﻿<%@ page language="java" 	import="java.util.*,com.tjsinfo.tjsoa.common.DealString,org.json.JSONArray,org.json.JSONObject" pageEncoding="UTF-8"%>
<%@page import="com.tjsinfo.tjsoa.common.ToolKit"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ page import="com.tjsinfo.tjsoa.articles.vo.TIndexArticles"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String bPath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort();
String menu=(String)request.getAttribute("menu");
String cname = (String)request.getAttribute("cname"); 
String cid = (String)request.getAttribute("cid"); 
String articlesTotalCount = (String)request.getAttribute("articlesTotalCount");
String pageNo = (String)request.getAttribute("pageNo");   
int ipageNo = Integer.parseInt(pageNo);   
String allPages = (String)request.getAttribute("allPages");   
DealString ds = new DealString();
 
List<TIndexArticles> articlesList=(List)request.getAttribute("articlesList"); 
List<TIndexArticles> zuixinxunxiList=(List)request.getAttribute("zuixinxunxiList");
List<TIndexArticles> jituandongtaiList=(List)request.getAttribute("jituandongtaiList");
List<TIndexArticles> xitongdongtaiList=(List)request.getAttribute("xitongdongtaiList");
//String strLoginname= (String)request.getAttribute("loginName");
String strLoginname = (String)request.getAttribute("loginname");
String userID = (String)request.getAttribute("userID");

int rightTitleSize=16;
int mainTitleSize=30;
%>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>天津市粮油集团有限公司</title>
<meta name="keywords" content="粮油" />
<link href="<%=basePath%>articles/style/test.css" type="text/css" rel="stylesheet" />
<link href="<%=basePath%>articles/style/component.css" type="text/css" rel="stylesheet" />
<script src="<%=basePath%>articles/js/swfobject_modified.js" type="text/javascript"></script>
<script language="javascript">
     function pageNoChange(value){
          window.location.href='<%=basePath %>tjsinfo/tjsoa/articles/List.do?&method=getList&cid=<%=cid %>&pageNo='+value;
     }
</script>
</head>

<body>
<div class="banner_news">
  <div class="xwlb">
    <div class="title_news title_xwlb">
    <h1><a href="<%=basePath%>tjsinfo/tjsoa/articles/shouyenews.do" style="float:right;margin-right:2px;"><img src="<%=basePath %>articles/images/return1.gif" width="70" /></a><%=cname %></h1></div>
       <ul class="xwlb_con_news">
           <%{%><% String title="";String createDate="";int datacha=0;
				for (int i=0;i<articlesList.size();i++) {
					TIndexArticles iarticles=articlesList.get(i);
					title= iarticles.getTitle().replace("<br/>","");
					if(title.length()>mainTitleSize){title=ds.substring(title,mainTitleSize-1)+"...";}
					createDate = iarticles.getCreateDate();
					createDate=ds.substring(createDate,10);
					datacha=iarticles.getTitleDate(title,createDate);
					String uuid = iarticles.getUuid();%>
			<li><span><%=createDate %></span><a href="<%=basePath %>tjsinfo/tjsoa/articles/List.do?method=viewArticle&uuid=<%=uuid %>&type=list" style="color:;"><%=title %>
			 <%if(datacha>=0 && datacha<3){%><img src="<%=basePath%>articles/images/19.gif" /><%} %>
			 </a></li>
			<%}%><%}%>                   
       </ul>
    </div>
    <div class="clean"></div>
    <div class="page">
     <ul>
      <li class="page-txt">共有<%=articlesTotalCount %>条数据 当前显示第<%=pageNo %>页 共<%=allPages %>页</li>
      <li><A href="<%=basePath %>tjsinfo/tjsoa/articles/List.do?&method=getList&cid=<%=cid %>&pageNo=1">首页</A></li>
      <%{ if (ipageNo>1){%> 
           <a href="<%=basePath %>tjsinfo/tjsoa/articles/List.do?&method=getList&cid=<%=cid %>&pageNo=<%=ipageNo-1 %>">上一页</a>，
      <%} %>
      <% if (ipageNo<Integer.parseInt(allPages)){%>
           <a href="<%=basePath %>tjsinfo/tjsoa/articles/List.do?&method=getList&cid=<%=cid %>&pageNo=<%=ipageNo+1 %>">下一页</a>，
      <%}} %>   
      <li>跳转到
           <label>
              <select name="select" onchange="pageNoChange(this.value);">
              <option value="1">请选择</option>
                   <%{%><% String ListpageNo="";
                   for (int i=0;i<Integer.parseInt(allPages);i++){
                   ListpageNo=String.valueOf(i+1);%>
              <option value="<%=ListpageNo%>"><%=ListpageNo%></option>
              <%}%><%}%>
              </select>
            </label>
       页</li>
       <li><A href="<%=basePath %>tjsinfo/tjsoa/articles/List.do?&method=getList&cid=<%=cid %>&pageNo=<%=allPages %>">尾页</A></li>
      </ul>
  </div>


</div>
</body>

</html>
